package ioc17;

import java.beans.PropertyEditorSupport;

public class AddressEditor extends PropertyEditorSupport {


    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        Address address=new Address();

        String[] s=text.split("-");

        address.setProvince(s[0]);
        address.setCity(s[1]);


        setValue(address);
    }

}
